package ZuoYe01_LeiyuDuiXiang_0428;

//汽车由发动机，轮胎，车架，底盘组成，
// 有外观，价格，油耗等属性
// 有启动，停止，鸣笛等方法。用oo的思
// 想定义汽车类，并测试。
public class QiChe {
	String name;
	String faDongJi;
	String lunTai;
	String cheJia;
	String diPan;

	String waiGuan;
	double jiaGe;
	double youHao;

	public void zuCheng() {
		System.out.println(name + "由发动机:" + faDongJi + "，轮胎:" + lunTai + "，车架:" + cheJia + "，底盘:" + diPan + "组成");
	}

	public void shuXing() {
		System.out.println("该车外观" + waiGuan + "，价格" + jiaGe + "，油耗" + youHao + "L/100KM");
	}

	public void qiDong() {
		System.out.println(name + "启动！");
	}

	public void tingZhi() {
		System.out.println(name + "停止！");
	}

	public void mingDi() {
		System.out.println(name + "鸣笛！");
	}

	public static void main(String[] args) {
		QiChe car = new QiChe();
		car.name = "二手奥拓";
		car.faDongJi = "二手发动机";
		car.lunTai = "二手轮胎";
		car.cheJia = "二手车架";
		car.diPan = "二手底盘";

		car.waiGuan = "红色";
		car.jiaGe = 50000;
		car.youHao = 7.7;

		car.zuCheng();
		car.shuXing();
		car.qiDong();
		car.mingDi();
		car.tingZhi();
	}

}
